{% macro pagination_list(pagination, endpoint) %}
<nav aria-label="">
    <ul class="pagination">
        <li class="page-item {% if not pagination.has_prev %}disabled{% endif %}">
            <a class="page-link"
                href="{% if pagination.has_prev %}{{url_for(endpoint, page=pagination.page-1, **kwargs)}}{% else %}#{% endif %}"
                tabindex="-1" aria-disabled="true">&laquo;</a>
        </li>

        {% for p in pagination.iter_pages() %}
        {% if p %}
        {% if p == pagination.page %}
        <li class="page-item active" aria-current="page">
            <a class="page-link" href="{{url_for(endpoint, page=p, **kwargs)}}">{{p}} <span
                    class="sr-only">(current)</span></a>
        </li>
        {% else%}
        <li class="page-item"><a class="page-link" href="{{url_for(endpoint, page=p, **kwargs)}}">{{p}}</a></li>
        {% endif %}
        <li class="page-item disabled}">
            <a class="page-link" href="#" tabindex="-1" aria-disabled="true">&hellip;</a>
        </li>
        {% endif %}
        {% endfor %}

        <li class="page-item {% if not pagination.has_next %}disabled{% endif %}">
            <a class="page-link"
                href="{% if pagination.has_next %}{{url_for(endpoint, page=pagination.page+1, **kwargs)}}{% else %}#{% endif %}"
                tabindex="-1" aria-disabled="true">&raquo;</a>
        </li>
    </ul>
</nav>
{% endmacro %}